import React from "react";
import { BasicForm } from "@antd/index";
import { Button } from "antd";
const formList = [
  {
    type: "input",
    label: "用户名",
    name: "username",
    placeholder: "请输入用户名",
  },
  {
    type: "input",
    label: "手机号",
    name: "phone",
    placeholder: "请输入手机号",
  },
];
const Search: any = React.memo(({ refreshTable, handleAction }: any) => {
  console.log("Search组件");
  return (
    <BasicForm
      formList={formList}
      refreshData={refreshTable}
      renderExra={() => (
        <>
          <Button onClick={() => handleAction({ type: "add" })}>新增</Button>
          <Button>导出</Button>
          <Button>导入</Button>
        </>
      )}
    />
  );
});

export default Search;
